/*  1:   */ package org.intellij.images.editor.actions;
/*  2:   */ 
/*  3:   */

import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.project.DumbAware;
import org.intellij.images.editor.ImageEditor;
import org.intellij.images.editor.ImageZoomModel;
import org.intellij.images.editor.actionSystem.ImageEditorActionUtil;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */
/* 10:   */ 
/* 11:   */ public final class ZoomOutAction
/* 12:   */   extends AnAction
/* 13:   */   implements DumbAware
/* 14:   */ {
/* 15:   */   public void actionPerformed(AnActionEvent paramAnActionEvent)
/* 16:   */   {
/* 17:33 */     ImageEditor localImageEditor = ImageEditorActionUtil.getValidEditor(paramAnActionEvent);
/* 18:34 */     if (localImageEditor != null)
/* 19:   */     {
/* 20:35 */       ImageZoomModel localImageZoomModel = localImageEditor.getZoomModel();
/* 21:36 */       localImageZoomModel.zoomOut();
/* 22:   */     }
/* 23:   */   }
/* 24:   */   
/* 25:   */   public void update(AnActionEvent paramAnActionEvent)
/* 26:   */   {
/* 27:41 */     super.update(paramAnActionEvent);
/* 28:42 */     if (ImageEditorActionUtil.setEnabled(paramAnActionEvent))
/* 29:   */     {
/* 30:43 */       ImageEditor localImageEditor = ImageEditorActionUtil.getValidEditor(paramAnActionEvent);
/* 31:44 */       ImageZoomModel localImageZoomModel = localImageEditor.getZoomModel();
/* 32:45 */       paramAnActionEvent.getPresentation().setEnabled(localImageZoomModel.canZoomOut());
/* 33:   */     }
/* 34:   */   }
/* 35:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.intellij.images.editor.actions.ZoomOutAction

 * JD-Core Version:    0.7.0.1

 */